package com.gomtel.smartdevice.activity;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.Window;


@SuppressWarnings("ALL")
public abstract class BaseActivity extends Activity {
    protected final String TAG = getClass().getSimpleName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
        onCreate();
    }

    protected abstract void onCreate();


    protected void initLayout(int layoutResID) {
        setContentView(layoutResID);
    }

    protected <T extends View> T find(int id) {
        return (T) super.findViewById(id);
    }
}
